package cn.store.dao;


import cn.store.domain.Order;
import cn.store.domain.OrderItem;
import cn.store.domain.PageModel;
import cn.store.domain.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface OrderDao {

	void saveOrder(Connection conn, Order order)throws Exception;

	void saveOrderItem(Connection conn, OrderItem item)throws Exception;

	int getTotalRecords(User user)throws Exception;

	int getTotalRecords(String st, String keyWord)throws Exception;

	List findMyOrdersWithPage(User user, int startIndex, int pageSize)throws Exception;

	Order findOrderByOid(String oid)throws Exception;

	void updateOrder(Order order)throws Exception;

	void updateOrderState(String oid,String state)throws Exception;

	List findAllOrders(String st,String keyWord,int startIndex, int pageSize)throws Exception;

    int deleteOrderById(String oid) throws SQLException;
}
